home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gsfunc0.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  2.1 KB  |  60 lines

  1. /* Copyright (C) 1997, 1999 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gsfunc0.h,v 1.2 2000/09/19 19:00:28 lpd Exp $ */
  20. /* Definitions for FunctionType 0 (Sampled) Functions */
  21.  
  22. #ifndef gsfunc0_INCLUDED
  23. #  define gsfunc0_INCLUDED
  24.  
  25. #include "gsfunc.h"
  26. #include "gsdsrc.h"
  27.  
  28. /* ---------------- Types and structures ---------------- */
  29.  
  30. /* Define the Function type. */
  31. #define function_type_Sampled 0
  32.  
  33. /* Define Sampled functions. */
  34. typedef struct gs_function_Sd_params_s {
  35.     gs_function_params_common;
  36.     int Order;            /* 1 or 3, optional */
  37.     gs_data_source_t DataSource;
  38.     int BitsPerSample;        /* 1, 2, 4, 8, 12, 16, 24, 32 */
  39.     const float *Encode;    /* 2 x m, optional */
  40.     const float *Decode;    /* 2 x n, optional */
  41.     const int *Size;        /* m */
  42. } gs_function_Sd_params_t;
  43.  
  44. #define private_st_function_Sd()    /* in gsfunc.c */\
  45.   gs_private_st_composite(st_function_Sd, gs_function_Sd_t,\
  46.     "gs_function_Sd_t", function_Sd_enum_ptrs, function_Sd_reloc_ptrs)
  47.  
  48. /* ---------------- Procedures ---------------- */
  49.  
  50. /* Allocate and initialize a Sampled function. */
  51. int gs_function_Sd_init(P3(gs_function_t ** ppfn,
  52.                const gs_function_Sd_params_t * params,
  53.                gs_memory_t * mem));
  54.  
  55. /* Free the parameters of a Sampled function. */
  56. void gs_function_Sd_free_params(P2(gs_function_Sd_params_t * params,
  57.                    gs_memory_t * mem));
  58.  
  59. #endif /* gsfunc0_INCLUDED */
  60.